﻿' ***********************************************************************
' Assembly         : Ioc
' Author           : Tim Ford
' Created          : 10-02-2013
'
' Last Modified By : Tim Ford
' Last Modified On : 10-02-2013
' ***********************************************************************
' <copyright file="MethodNotFound.vb" company="Red Baron Solutions">
'     Red Baron Solutions. All rights reserved.
' </copyright>
' <summary></summary>
' ***********************************************************************
Imports System.Runtime.Serialization
Imports System.Security.Permissions


Namespace Ioc.Exceptions
    ''' <summary>
    ''' 	
    ''' </summary>
    <Serializable> _
    Public Class MethodNotFoundException
        Inherits Exception
        ''' <summary>
        ''' Initializes a new instance of the <see cref="MethodNotFoundException" /> class.	
        ''' </summary>
        ''' <param name="type">The type.</param>
        ''' <param name="methodName">Name of the method.</param>
        ''' <param name="sig">The sig.</param>
        ''' <remarks></remarks>
        Public Sub New(type As Type, methodName As String, sig As IEnumerable(Of DataObjects.MethodSignature))
            MyBase.New(My.Resources.Resources.MethodNotFoundLookAtTypeMethodNameMethodSi)
            m_Type = type
            m_MethodName = methodName
            m_MethodSignature = sig
        End Sub
        Public Sub New()
            
        End Sub
        Public Sub New(ByVal message As String)
            MyBase.New(message)
            
        End Sub
        Public Sub New(ByVal message As String, ByVal innerException As Exception)
            MyBase.New(message, innerException)
            
        End Sub
        Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
            MyBase.New(info, context)
            
        End Sub

        ''' <summary>
        ''' Gets the type.	
        ''' </summary>
        ''' <value></value>
        ''' <remarks></remarks>
        Public ReadOnly Property Type() As Type
            Get
                Return m_Type
            End Get
        End Property
        Private m_Type As Type

        ''' <summary>
        ''' Gets the name of the method.	
        ''' </summary>
        ''' <value>The name of the method.</value>
        ''' <remarks></remarks>
        Public ReadOnly Property MethodName() As String
            Get
                Return m_MethodName
            End Get
        End Property
        Private m_MethodName As String


        ''' <summary>
        ''' Gets the method signature.	
        ''' </summary>
        ''' <value></value>
        ''' <remarks></remarks>
        Public ReadOnly Property MethodSignature() As IEnumerable(Of DataObjects.MethodSignature)
            Get
                Return m_MethodSignature
            End Get
        End Property
        Private m_MethodSignature As IEnumerable(Of DataObjects.MethodSignature)




#Region "ISerialization Implementation"

        ''' <summary>
        ''' Gets the object data.	
        ''' </summary>
        ''' <param name="info">The info.</param>
        ''' <param name="context">The context.</param>
        ''' <remarks></remarks>
        <SecurityPermission(SecurityAction.Demand, SerializationFormatter:=True)> _
        Public Overrides Sub GetObjectData(info As SerializationInfo, context As StreamingContext)

            MyBase.GetObjectData(info, context)

            info.AddValue("m_Type", m_Type)
            info.AddValue("m_MethodName", m_MethodName)

        End Sub

#End Region
    End Class
End Namespace